package com.qsw.qswcommonlib.bean;

/**
 * 应用流量封装
 */
public class TrafficInfo {
    private int uid;
    private String packageName;
    private long rx;
    private long tx;

    public TrafficInfo(int uid, String packageName, long rx, long tx) {
        this.uid = uid;
        this.packageName = packageName;
        this.rx = rx;
        this.tx = tx;
    }

    public int getUid() {
        return uid;
    }

    public String getPackageName() {
        return packageName;
    }

    public long getRx() {
        return rx;
    }

    public long getTx() {
        return tx;
    }

    public float getRxM() {
        return rx / 1024F / 1024;
    }

    public float getTxM() {
        return tx / 1024F / 1024;
    }

    public float getTotalM() {
        return (rx + tx) / 1024F / 1024;
    }
}
